<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>BlueVideo首页</title>
	<link rel="icon" href="img/title.ico" type="image/x-icon">
    <link href="https://fonts.googleapis.com/css?family=Muli:300,400,500,600,700,800,900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
    <link rel="stylesheet" href="css/themify-icons.css" type="text/css">
    <link rel="stylesheet" href="css/elegant-icons.css" type="text/css">
    <link rel="stylesheet" href="css/owl.carousel.min.css" type="text/css">
    <link rel="stylesheet" href="css/nice-select.css" type="text/css">
    <link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
    <link rel="stylesheet" href="css/slicknav.min.css" type="text/css">
    <link rel="stylesheet" href="css/style.css" type="text/css">
    <style type="text/css">
    a{
    	text-decoration: none;
    }
    </style>
</head>
<body>
    <!-- Page Preloder -->
    <div id="preloder">
        <div class="loader"></div>
    </div>
    
    
    <c:if test="${ user.user_name != null }">
    	<a href="BlueVideoFedSeed" style="color: #fff;">
	    <div style="position: fixed;z-index: 98;bottom: 5%;left: 5px;background: #000;color: #fff;border-radius: 50%;padding: 5px;height: 43px;line-height: 32px;">
	    	反馈
	    </div>
	    </a>
    </c:if>
    
    
    <sql:setDataSource var="snapshot" driver="com.mysql.cj.jdbc.Driver"
	url="jdbc:mysql://localhost:3306/${ SqlName }?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"
	user="${ SqlUser }"  password="${ SqlPass }"/>

    <!-- Header Section Begin -->
    <header class="header-section" style="position: fixed;top: 0;z-index: 99;width: 100%;">
        <div class="nav-item" style="position: relative;">
            <div class="container">
                <div class="nav-depart" style="position: fixed;left: 0;">
                    <div class="depart-btn">
                        <i class="ti-menu"></i>
                        <span><span style="color: #8fb0db;">Blue</span> VIDEO</span>
                        <ul class="depart-hover">
                            <li><a href="BlueVideoColle">我的收藏</a></li>
                            <li><a href="#">展览演出</a></li>
                            <li><a href="#">历史记录</a></li>
                        </ul>
                    </div>
                </div>
                <nav class="nav-menu mobile-menu">
                    <ul style="margin-left: 291px;">
                        <li class="active"><a href="BlueVideo">首页</a></li>
                        <li><a href="BlueVideoRec" style="border: none;">推荐</a></li>
                        <li>
                            <form action="SelectVideo" method="get">
                                <input class="primary-btn" type="text" id="username" name="selectvideo" style="margin-left:10px;background-color: #fff;color: black;border: none;">
                                <input class="primary-btn" type="submit" value="搜索" style="margin-right: 10px;margin-left: -4px;margin-top: 5px;border: none;">
                            </form>
                        </li>
                    </ul>
                    <ul style="position: fixed;right: -20px;">
                        <c:if test="${ user.user_name==null }">
                        	<li style="position: relative;"><a href="#" style="width: 100%;display: block;">
                            未登录
	                        </a>
	                        	<ul class="dropdown">
	                                <li><a href="BlueVideoLogin">去登录</a></li>
	                                <li><a href="BlueVideoReg">去注册</a></li>
	                            </ul>
	                        </li>
                        </c:if>
                        <c:if test="${ user.user_name!=null }">
                        <li>
                        	<a href="BlueVideoAdd">创作视频</a>
                        </li>
                        	<li style="position: relative;"><a href="#" style="width: 100%;display: block;">
                            <img src="img/UserImg/${ user.user_img }" style="position: absolute;top: 0;left: -20%;width: 38%;border-radius:100%;">
                            ${ user.user_name }
                            </a>
	                            <ul class="dropdown">
	                                <li><a href="BlueVideoUserIndex">个人信息</a></li>
	                                
	                                <li style="position: relative;">
	                                <a href="BlueVideoUserMsg">信息</a>
	                                <sql:query dataSource="${snapshot}" var="resultusermsgsum">
									SELECT COUNT(msg_log) AS usermsgsum FROM user_msg WHERE user_id = ${ user.user_id } AND msg_log = 1;
									</sql:query>
									
									<c:forEach var="rowusermsgsum" items="${ resultusermsgsum.rows }">
									<c:if test="${ rowusermsgsum.usermsgsum > 0 }">
									<div style="position: absolute;left:65px;top: 12px;background: red;border-radius: 50%;color: #fff;">
	                                	<div style="width: 25px;text-align:center;">${ rowusermsgsum.usermsgsum }</div>
	                                </div>
									</c:if>
	                                </c:forEach>
	                                </li>
	                                
	                                <li><a href="BlueVideoSeeUser?SeeUserid=${ user.user_id }">动态</a></li>
	                                <li><a href="BlueVideoUserMyVideo">我的视频</a></li>
	                                <li><a href="BlueVideoUserOut" style="color: #aaa000">退出登录</a></li>
	                            </ul>
	                        </li>
                        </c:if>
                    </ul>
                </nav>
                <div id="mobile-menu-wrap"></div>
            </div>
        </div>
    </header>
    <!-- Header End -->

    <!-- Hero Section Begin -->
    <section class="hero-section">
        <div class="hero-items owl-carousel">
            <div class="single-hero-items set-bg" data-setbg="img/Home01.jpg">
                <div class="container">
                    <div class="row">
                        <div class="col-lg-5">
                            <h1 style="color: #8cbedf;">《蔚蓝档案》</h1>
                            <h3 style="color: #fff;">一周年纪念PV——向着黎明奔去</h3>
                            <p style="color: #49a2dd;">作词：夕野ヨシミ(IOSYS)
                                作曲：Mitsukiyo
                                编曲：Mitsukiyo/何方
                                歌手：东山奈央/石上静香
                                混音/母带：何方
                                吉他录制 : JuNN
                                贝斯录制: Kyunghwan Yoo
                                导唱: Shabel Tonya
                                制作协力：Aegir,inc</p>
                            <a href="BlueVideoPlay?VideoID=17" class="primary-btn">立即观看</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="single-hero-items set-bg" data-setbg="img/Home02.jpg">
                <div class="container">
                    <div class="row">
                        <div class="col-lg-5">
                            <h1 style="color: #49a2dd;">《蔚蓝档案》</h1>
                            <h3 style="color: #d5ecba;">专属PV【与你的独家记忆】小雏菊的密语</h3>
                            <p style="color: #ffffff;">看到了...好多好多的花。
                                带我来这里，谢谢你。</p>
                            <a href="BlueVideoPlay?VideoID=18" class="primary-btn" style="background-color: #f19fd6;">立即观看</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- Hero Section End -->

    <!-- Banner Section Begin -->
    <div class="banner-section spad">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-4">
                    <div class="single-banner">
                        <a href="BlueVideoRanking">
                        	<img src="img/排行.jpg" alt="">
	                        <div class="inner-text">
	                            <h4>排行榜</h4>
	                        </div>
                        </a>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="single-banner">
						<a href="BlueVideoNewLits">
							<img src="img/最新.jpg" alt="">
	                        <div class="inner-text">
	                            <h4>最新榜</h4>
	                        </div>
						</a>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="single-banner">
                        <a href="BlueVideoHotList">
	                        <img src="img/热门.jpg" alt="">
	                        <div class="inner-text">
	                            <h4>热门榜</h4>
	                        </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Banner Section End -->

    <!-- Women Banner Section Begin -->
    <section class="women-banner spad">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-3">
                    <div class="product-large set-bg" data-setbg="img/jinxuan.jpg">
                        <h2>精选</h2>
                        <a href="#">更多发现</a>
                    </div>
                </div>
                <div class="col-lg-8 offset-lg-1">
                    <div class="filter-control">
                        <img alt="" style="width: 100%" src="img/gg01.png">
                    </div>
                    <div class="product-slider owl-carousel">

				    <sql:query dataSource="${snapshot}" var="result1">
					select * from video_table;
					</sql:query>

						<c:forEach var="row" items="${ result1.rows }">
                        <div class="product-item">
                            <div class="pi-pic">
                                <img src="Video/${ row.videoimg }" alt="">
                                <div class="sale">${ row.videopint }</div>
                                <div class="icon">
                                </div>
                                <ul>
                                    <li class="w-icon active"><a href="#">9.9</a></li>
                                    <li class="quick-view"><a href="BlueVideoPlay?VideoID=${ row.videoid }">立即观看</a></li>
                                    <li class="w-icon"><a href="#"><i class="fa fa-random"></i></a></li>
                                </ul>
                            </div>
                            <div class="pi-text">
                                <div class="catagory-name">UID:${ row.videoid }</div>
                                <a href="#">
                                    <h5>${ row.videoname }</h5>
                                </a>
                                <div class="product-price">
                                    点赞数:${ row.videogoodjob }
                                </div>
                            </div>
                        </div>
                        </c:forEach>

                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- Women Banner Section End -->

    <!-- Deal Of The Week Section Begin-->
    <!-- Deal Of The Week Section End -->

    <!-- Man Banner Section Begin -->
    <section class="man-banner spad">
        <div class="container-fluid">
        	<div class="row">
                        <c:forEach var="row" items="${ result1.rows }">
                            <div class="col-lg-3 col-sm-6">
                                <div class="product-item">
                                    <div class="pi-pic">
                                        <img src="Video/${ row.videoimg }" alt="">
                                        <div class="sale pp-sale">${ row.videopint }</div>
                                        <ul>
                                            <li class="w-icon active"><a href="#">${ row.videopf }</a></li>
                                            <li class="quick-view"><a href="BlueVideoPlay?VideoID=${ row.videoid }">立即观看</a></li>
                                            <li class="w-icon"><a href="#"><i class="fa fa-random"></i></a></li>
                                        </ul>
                                    </div>
                                    <div class="pi-text">
                                        <div class="catagory-name">uid:${ row.videoid }</div>
                                        <div class="product-price">
                                            ${ row.videoname }
                                        </div>
                                    </div>
                                </div>
                            </div>
			            </c:forEach>
                        </div>
            </div>
        </div>
    </section>
    <!-- Man Banner Section End -->

    <!-- Js Plugins -->
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery-ui.min.js"></script>
    <script src="js/jquery.countdown.min.js"></script>
    <script src="js/jquery.nice-select.min.js"></script>
    <script src="js/jquery.zoom.min.js"></script>
    <script src="js/jquery.dd.min.js"></script>
    <script src="js/jquery.slicknav.js"></script>
    <script src="js/owl.carousel.min.js"></script>
    <script src="js/main.js"></script>
</body>

</html>